package com.itheima.aop;

import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Component("teacher")
@Aspect
public class Teacher {

    // 配置点
    @Pointcut("execution(* *..*(..))")
    public void pc(){

    }

    @Before("pc()")
    public void before() {
        System.out.println("每日回顾！");
    }

    @AfterReturning("pc()")
    public void afterReturing() {
        System.out.println("每日总结!");
    }

    @AfterThrowing("pc()")
    public void afterThrowing() {
        System.out.println("解答问题!");
    }

    @After("pc()")
    public void after() {
        System.out.println("高薪就业!");
    }

}
